﻿@model KL.Store.Web.Models.ContactUsModel
@using KL.Store.Core;
@using CaptchaMvc.HtmlHelpers;
<div class="content">
    <h1>İletişim</h1>
    @*    @using (Html.BeginForm("Save", "ContactUs", null, FormMethod.Post, new { name = "contactus", id = "contactus" }))*@
    @using (Ajax.BeginForm("Save", "ContactUs", new { }, new AjaxOptions { UpdateTargetId = "divContactUs", HttpMethod = "Post", }, new { id = "contactus", name = "contactus", @class = "form-horizontal" }))
    {
        <div class="form-group">
            <label for="Name" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Adınız ve Soyadınız <span class="requireStar">*</span> : </label>
            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                @Html.TextBoxFor(model => model.Name, new { @class = "form-control", @placeHolder = "Ad ve Soyadınızı Yazınız" })@Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>
        <div class="form-group">
            <label for="Email" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">E-Posta Adresiniz <span class="requireStar">*</span> : </label>
            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                @Html.TextBoxFor(model => model.Email, new { @class = "form-control", @placeHolder = "E-Posta Adresinizi Yazınız" })@Html.ValidationMessageFor(model => model.Email)
            </div>
        </div>
        <div class="form-group">
            <label for="Phone" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Telefon Numaranız <span class="requireStar">*</span> : </label>
            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                @Html.TextBoxFor(model => model.Phone, new { @class = "form-control", @placeHolder = "Cep Telefonunuzu Yazınız" })@Html.ValidationMessageFor(model => model.Phone)
            </div>
        </div>
        <div class="form-group">
            <label for="Department" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Departman <span class="requireStar">*</span> : </label>
            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                @{var departments = new List<SelectListItem> {
                                new SelectListItem {Text = "Yönetim", Value = "Yönetim"},
                                new SelectListItem {Text = "Muhasebe", Value = "Muhasebe"},
                                new SelectListItem {Text = "Satış", Value = "Satış"},
                                new SelectListItem {Text = "Müşteri Memnuniyeti", Value = "Müşteri Memnuniyeti"}
                              };
                }
                @Html.DropDownListFor(model => model.Department, departments, new { @class = "form-control" })@Html.ValidationMessageFor(model => model.Department)
            </div>
        </div>
        <div class="form-group">
            <label for="City" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">İl <span class="requireStar">*</span> : </label>
            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                @Html.DropDownListFor(m => m.City, new SelectList(Model.CityList, "CityId", "CityName"), new { @class = "form-control" })
            </div>
        </div>
        <div class="form-group">
            <label for="Subject" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Konu Başlığı <span class="requireStar">*</span> : </label>
            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                @Html.TextBoxFor(model => model.Subject, new { @class = "form-control", @placeholder = "Konu Başlığını Yazınız" })@Html.ValidationMessageFor(model => model.Subject)
            </div>
        </div>
        <div class="form-group">
            <label for="Message" class="col-xs-12 col-sm-12 col-md-3 col-lg-3 control-label">Mesajınız <span class="requireStar">*</span> : </label>
            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                @Html.TextAreaFor(model => model.Message, new { @class = "form-control" })@Html.ValidationMessageFor(model => model.Message)
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
                <label for="CaptchaInputText" class="control-label">Doğrulama Kodu<span class="requireStar">*</span> : </label>
            </div>
            <div class="col-xs-12 col-sm-12 col-md-8 col-lg-6">
                <div class="captcha">
                    @Html.Captcha("Yenile", "Doğrulama kodunu giriniz.", 5, "Bu alan zorunludur.")
                    <div class="captchaBG">
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
                @Html.ValidationSummary(true, "İletişim formu gönderilemedi. Lütfen eksik bilgileri kontrol ediniz.")
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-12 col-sm-12 col-lg-offset-3 col-lg-9 col-md-offset-3 col-md-9">
                <a href="/Home/Index" class="btn btn-custom1">Geri</a>
                <input type="submit" class="btn btn-custom1" value="Gönder" />
            </div>
        </div>
    }
</div>
<script>
    $(function () {
        $(".info-list").each(function () {
            if ($(this).attr("id") == "menuContact") {
                $(this).css("display", "block");
            }
        });
        $("#mnContactUsForm").addClass("menuActive");
    });
</script>
